<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }

    ul {
      margin: 100px;
    }

    ul li {
      float: left;
      margin: 0 10px;
      width: 120px;
      height: 35px;
      list-style: none;
      line-height: 35px;
      text-align: center;
      perspective: 1000px;
    }

    .hezi {
      position: relative;
      width: 100%;
      height: 100%;
      transform-style: preserve-3d;
      transition: all .4s;
    }

    .hezi:hover {
      transform: rotateX(90deg);
      cursor: pointer;
    }

    .hezi-f,
    .hezi-b {
      position: absolute;
      left: 0;
      top: 0;
      width: 100%;
      height: 100%;
      backface-visibility: hidden;
    }

    .hezi-f {
      transform: translateZ(50%);
      background-color: pink;
    }

    .hezi-b {
      transform: translateY(18px) rotateX(-90deg);
      background-color: blueviolet;
    }
  </style>
</head>

<body>
  <h4>案例: 3D导航栏</h4>
  <ul>
    <li>
      <div class="hezi">
        <div class="hezi-f">叁昇</div>
        <div class="hezi-b">sansheng</div>
      </div>
    </li>
    <li>
      <div class="hezi">
        <div class="hezi-f">叁昇</div>
        <div class="hezi-b">sansheng</div>
      </div>
    </li>
    <li>
      <div class="hezi">
        <div class="hezi-f">叁昇</div>
        <div class="hezi-b">sansheng</div>
      </div>
    </li>
  </ul>
</body>

</html>